package nc.bs.gsp.hf058405;

import java.util.Collection;

import nc.bs.medpub.pub.MedQueryDMO;
import nc.vo.gsp.hf058405.GKTSDJHeadVO;
import nc.vo.gsp.pub.GspConst;
import nc.vo.jcom.lang.StringUtil;
import nc.vo.pub.BusinessException;
import nc.vo.pub.CircularlyAccessibleValueObject;

public class GspGktsdjDMO extends MedQueryDMO {
	
	@Override
	protected String getBillType() {
		return GspConst.GKTSDJ;
	}
	
	@Override
	protected Class<?> getHeadVOClass() throws BusinessException {
		
		return GKTSDJHeadVO.class;
	}
	
	@Override
	protected Class<?> getBodyVOClass() throws BusinessException {
		
		return GKTSDJHeadVO.class;
	}

	public CircularlyAccessibleValueObject[] queryAllHeadData(String whereString) throws BusinessException {
		String strWhere = " nvl(dr,0)=0 ";
		if (!StringUtil.isEmptyWithTrim(whereString)) {
			strWhere += " and (" + whereString + ")";
		}
		Collection rs = getDao().retrieveByClause(GKTSDJHeadVO.class, strWhere);
		if (rs != null && !rs.isEmpty()) {
			return (GKTSDJHeadVO[]) rs.toArray(new GKTSDJHeadVO[0]);
		}
		return null;
	}

	public CircularlyAccessibleValueObject[] queryAllBodyData(String key) throws BusinessException {

		return null;
	}

	public CircularlyAccessibleValueObject[] queryAllBodyData(String key, String whereString) throws BusinessException {

		return null;
	}

}
